// miniprogram/test/test2/test2.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    latitude:"28.72451",
    longitude:"115.834968",
    markers:[
      {
        id: 0,
        iconPath: "../../images/map.png",
        latitude: 28.718153,
        longitude:115.827033,
        width: 50,  
        height: 50,  
        title:"蜜雪冰城(东华理工大学)"
      },
      {
        id: 1,
        iconPath: "../../images/map.png",
        latitude: 28.726115,
        longitude:115.837033,
        width: 50,  
        height: 50,  
        title:"蜜雪冰城(理工学院店)"
      },
      {
        id: 2,
        iconPath: "../../images/map.png",
        latitude: 28.725615,
        longitude:115.827033,
        width: 50,  
        height: 50,  
        title:"蜜雪冰城(理工学院店)"
      },
      {
        id: 3,
        iconPath: "../../images/map.png",
        latitude: 28.715115,
        longitude:115.817033,
        width: 50,  
        height: 50,  
        title:"蜜雪冰城(理工学院店)"
      },
      {
        id: 4,
        iconPath: "../../images/map.png",
        latitude: 28.726315,
        longitude:115.817033,
        width: 50,  
        height: 50,  
        title:"蜜雪冰城(理工学院店)"
      },
      {
        id: 5,
        iconPath: "../../images/map.png",
        latitude: 28.708115,
        longitude:115.827033,
        width: 50,  
        height: 50,  
        title:"蜜雪冰城(理工学院店)"
      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (res) {
      var latitude = res.latitude;
      var longitude = res.longitude;
      this.setData({
        latitude: res.latitude,
        longitude: res.longitude,
        markers: [{
          latitude: res.latitude,
          longitude: res.longitude
      }]
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})